import java.util.ArrayList;

enum portType {
	COMPANY, INDIVIDUAL;
}

public class Portfolio {

	private int portfolioId;
	private portType portfolioType;
	public ArrayList<Account> accounts = new ArrayList<Account>();
	private Profile profile;
	private int accountId = 0;

	public Portfolio(int portfolioId, portType portfolioType,
			acctype accountType) {
		accountId++;
		this.portfolioId = portfolioId;
		this.portfolioType = portfolioType;
		profile = new Profile();
	}

	public portType getPortfolioType() {
		return portfolioType;
	}

	public void setPortfolioType(portType portfolioType) {
		this.portfolioType = portfolioType;
	}

	public ArrayList<Account> getAccounts() {
		return accounts;
	}

	public void setAccounts(ArrayList<Account> accounts) {
		this.accounts = accounts;
	}

	public Profile getProfile() {
		return profile;
	}

	public void setProfile(Profile profile) {
		this.profile = profile;
	}

	public int getAccountId() {
		return accountId;
	}

	public void setAccountId(int accountId) {
		this.accountId = accountId;
	}

	public void display() {
		profile.displayProfileDetails();
		for (Account account : accounts) {
			account.displayAccountDetails();
		}
	}

	public int getPortfolioId() {
		return portfolioId;
	}

	public void setPortfolioId(int portfolioId) {
		this.portfolioId = portfolioId;
	}

	public Account getAccount(int accountId) {
		for (Account acc : accounts) {
			if (acc.getAccountId() == accountId) {
				return acc;
			}
		}
		return null;
	}

	public void update() {
	}
}
